import logging,yagmail

def log_connect():
    logging.basicConfig(filename='rizhi.log',filemode='w+',level=logging.DEBUG,format='%(asctime)s***%(funcName)s***%(created)f***%(levelname)s')

def email(filename):
    qq=yagmail.SMTP(user='2314336117@qq.com',password='ixpbgkkezjwodhif',host='smtp.qq.com')
    qq.send(to='2314336117@qq.com',subject='yuekao',contents='shengban',attachments=filename)